<!DOCTYPE html>
<html lang="en">
        <head>
        <meta charset="utf-8">
        <title>Login to v3admin</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

        <!-- Le styles -->

        <link href="<?=$url?>assets/css/bootstrap.min.css" rel="stylesheet">
        <link href="<?=$url?>assets/css/style.css" rel="stylesheet">
        <link href="<?=$url?>assets/css/colorbox.css" rel="stylesheet">
        <style type="text/css">
body {
	padding-top: 60px;
	padding-bottom: 40px;
}
.sidebar-nav {
	padding: 9px 0;
}
#LoginPopup
{
	display:snone;
}
</style>
<link href="<?=$url?>assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="<?=$url?>assets/css/media-fluid.css" rel="stylesheet">

<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
  <script src="../../../html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

</head>

<body>
<div id="LoginPopup">
          <div id="masker">
    <div id="loginform">
              <form class="loginForm" id="popupLoginForm" method="post">
        <div id="loginBg">
                  <div id="loginBgGraphic"></div>
                </div>
        <div class="loginContainer">
                  <h3><img src="<?=$url?>assets/img/logo.png" width="129" height="30"></h3>
                  <h2>Login</h2>
                  <?php
                  if(validation_errors()){
                    print '<div class="lerror alert-error alert" id="lerror">'.validation_errors().'</div>';
                  }
                  if($message == "gagal"){
                    print '<div class="lerror alert-error alert" id="lerror">Username dan Password tidak sesuai</div>';
                  }
                  ?>
                  <fieldset class="formContent">
          
    <div class="fieldContainer input-prepend">
                      <label for="memuname">Username</label>
                      <span class="add-on"><i class="icon-user"></i></span><input value="<?=$field['memuname']?>" id="memuname" name="memuname" type="text" class="textInput" autocomplete="off" />
                    </div>
            <div class="fieldContainer input-prepend">
                      <label for="mempass">Password</label>
                       <span class="add-on"><i class="icon-lock"></i></span><input id="mempass" name="mempass" type="password" class="textInput" autocomplete="off" />
                    </div>
          </fieldset>
                  <input name="login" type="hidden" value="Login">
                  <input name="formtype" type="hidden" value="login">
                </div>
        <div class="formContent">
                  <button type="submit" class="btn "><i class="icon-lock"></i> Sign in</button>
                  <!--<button type="button"  onclick="forgotPassword(false);" class="btn"><i class="icon-user"></i> Forgot your password?</button>-->
                </div>
      </form>
            </div>
    <!-- login fom end -->
    <div id="forgotform">
              <form class="loginForm" id="popupLoginForm" method="post" action="login.html">
        <div id="loginBg">
                  <div id="loginBgGraphic"></div>
                </div>
        <div class="loginContainer">
                  <h3><img src="<?=$url?>assets/img/logo.png" width="129" height="30"></h3>
                  <h2>Forgot Password</h2>
                  <div class="lerror alert-error alert" id="lerror1">No need username and password</div>
                  <fieldset class="formContent">
            <div class="fieldContainer input-prepend">
                      <label for="mememail">Email </label>
                      <span class="add-on"><i class="icon-envelope"></i></span><input id="mememail" name="mememail" type="text" class="textInput"  autocomplete="off"/>
                    </div>
            <div class="fieldContainer"></div>
          </fieldset>
                  <input name="login" type="hidden" value="FORGOT">
                  <input name="formtype" type="hidden" value="forgot">
                </div>
        <div class="formContent">
                  <button type="submit" class="btn"><i class="icon-user"></i> Submit</button>
                  <button type="button"  onclick="loginform(false);" class="btn "><i class="icon-lock"></i> Login Here</button>
                </div>
      </form>
            </div>
  </div>
</div>

<!-- Le javascript
        ================================================== --> 
<!-- Placed at the end of the document so the pages load faster --> 
<script src="<?=$url?>assets/js/jquery.min.js"></script> 
<script type='text/javascript' src='<?=$url?>assets/js/jquery.colorbox-min.js?ver=1.3.16'></script> 
<script type="text/javascript">
            $(document).ready(function(c){
 					$('#LoginPopup').css({'display':'block'});
				  c.fn.colorbox({inline:true, href:"#LoginPopup",onClosed:reopenit});
				
				  //jQuery('.lerror').html(loginemesage);
				 function reopenit()
				 {
					  c.fn.colorbox({inline:true, href:"#LoginPopup",onClosed:reopenit});
				 }
			});
			function focusnow()
			{
				if($("#loginform").css("display")!="none")
				{
					$("#memuname").focus();
				}
				if($("#forgotform").css("display")!="none")
				{
					$("#mememail").focus();
				}	
			}
			function forgotPassword(isauto)
			{
				$("#forgotform").css({"display":"block"});
				$("#loginform").css({"display":"none"});
				$("#mememail").focus();
				if(isauto==false)
				{
				//$("#lerror1").html('');
				}
				
			}
			function loginform(isauto)
			{
				
				$("#forgotform").css({"display":"none"});
				$("#loginform").css({"display":"block"});
				$("#memuname").focus();
				if(isauto==false)
				{
				//$("#lerror").html('');
				}
			}
		</script>
</body>
</html>
